package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    User selectByPrimaryKey(Long id);

    List<User> selectAll(QueryObject queryObject);

    int updateByPrimaryKey(User record);

    User checkEmail(String email);

    User selectByInfo(@Param("email") String email, @Param("password") String password);

    void concern(@Param("userId") Long userId, @Param("fansId") Long fansId);

    int isConcern(@Param("userId") Long userId, @Param("fansId") Long fansId);

    List<User> getFans(Long id);

    List<User> getWatchs(Long id);
    //查询全部的用户，不带分页的
    List<User> selectForList();

}